<HTML xmlns:IE>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>打印设计</TITLE>
<STYLE>   
   .userData{behavior:url(#default#userData);}
   @media all{IE\:clientCaps {behavior:url(#default#clientcaps)}}
   @media all
    {
	    IE\:piece{ 
	                behavior: url(movable.htc);
	                cursor: move;
	                color:black;
	                 background:#d8ebfb ;	                   
	                font: bold 12px verdana;
	                BORDER-TOP: MediumSlateBlue  1px solid;
	                BORDER-LEFT:MediumSlateBlue  1px solid;
	                BORDER-RIGHT:MediumSlateBlue  1px solid;
	                BORDER-BOTTOM:MediumSlateBlue  1px solid;
                }
    }
</STYLE>
<SCRIPT language=javaScript src="/webprint/billprint/public.js"></SCRIPT>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
var tableHtml=window.dialogArguments[0]
var BillName=window.dialogArguments[1]
//节点内容串
var SendParameter=window.dialogArguments[2]		

var number=1
var screenWidth=ExculpateRate.width
var screenHeight=ExculpateRate.height


function window_onload() {
	//将初始设置信息存入缓存中
	var strPageSet=window.dialogArguments[5]
	if (strPageSet!=""){
		SaveUserData("billprint",BillName,strPageSet)		
	}
	var strPageAll=window.dialogArguments[6]
	if (strPageAll!="") {
		SaveUserData("node",BillName,strPageAll)
	}
	loadLabelData("打印设计",screenWidth,screenHeight)
}
function closeself_onclick() {
	self.close ()
}
function cmdSave_onclick() {
	SaveData()
	alert("保存成功!")
}
function SaveData() {
//收集各节点信息
	var strAll=""
	var oNodeList=document.all.item("fcsoft_node")

	for(var i=0;i<oNodeList.length;i++){
		var LabelLeft=oNodeList[i].style.pixelLeft
		var LabelTop=oNodeList[i].style.pixelTop
		var LabelWidth=oNodeList[i].offsetWidth
		var SpaceBetween=oNodeList[i].style.letterSpacing
		var FontSize=oNodeList[i].style.fontSize
		var FontFace=oNodeList[i].style.fontFamily
		var BoldFont=oNodeList[i].style.fontWeight
		var LineFont=oNodeList[i].style.textDecoration
		var FontItalic=oNodeList[i].style.fontStyle
		var Color=oNodeList[i].style.color
		var Align=oNodeList[i].style.textAlign
		
		strAll=strAll+"<node>"
		+"<LabelLeft>"+LabelLeft+"</LabelLeft>"+"<LabelTop>"+LabelTop+"</LabelTop>"+"<LabelWidth>"+LabelWidth+"</LabelWidth>"
		+"<SpaceBetween>"+SpaceBetween+"</SpaceBetween>"+"<FontSize>"+FontSize+"</FontSize>"
		+"<FontFace>"+FontFace+"</FontFace>"+"<BoldFont>"+BoldFont+"</BoldFont>"
		+"<LineFont>"+LineFont+"</LineFont>"+"<FontItalic>"+FontItalic+"</FontItalic>"
		+"<Color>"+Color+"</Color>"+"<Align>"+Align+"</Align>"
	
		+"</node>"
	}

	SaveUserData("node",BillName,strAll)
	aa.value=strAll;
}

function PageDesign_onclick() {
	//进入页面设置界面
	var Design=new Array()
		Design[0]=BillName
		Design[1]=userData

	var DesignReturn=window.showModalDialog("pagedesign.htm",Design,"dialogHeight:330px;dialogWidth:310px;dialogTop:50px;dialogLeft:85px;status:no;scroll:no")
	//刷新纸张的高度和宽度
	if(DesignReturn)
		loadLabelData("打印设计",screenWidth,screenHeight)
}
function printpreview_onclick() {
	SaveData()	
	PrintPreview1()
}

function window_onbeforeunload() {
	SaveData()
}

//-->
</SCRIPT>
</HEAD>
<BODY LANGUAGE=javascript onload="return window_onload()" bgColor=lightgrey onbeforeunload="return window_onbeforeunload()">
<label id=result style="HEIGHT: 550px; LEFT: 0px; OVERFLOW: scroll; POSITION: absolute; TOP: 0px; WIDTH: 795px"></label>

<table  WIDTH="98%" BORDER=1 CELLSPACING=0 CELLPADDING=0  bgcolor=silver style="POSITION: absolute">
<tr><td></td>
<td><INPUT type=button value="打印预览"  LANGUAGE=javascript onclick="printpreview_onclick()"></td>
<td><INPUT type=button value="页面设置" LANGUAGE=javascript onclick="PageDesign_onclick()"></td>
<td><INPUT id=cmdSave type=button value="保 存" LANGUAGE=javascript onclick="return cmdSave_onclick()"></td>
<td width=800>
</td>
<td><INPUT type="Button" value="关&nbsp;闭" id=closeself name=button3 LANGUAGE=javascript onclick="return closeself_onclick()"></td>
</tr>
</table>
<textarea id="aa" rows="10" cols="10" style="display:"></textarea>
</BODY>
</HTML>
